(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/PageAdvComponent.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '62ed97+eaxOope69pROPIba', 'PageAdvComponent', __filename);
// Script/PageAdvComponent.ts

Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var PageAdvComponent = (function (_super) {
    __extends(PageAdvComponent, _super);
    function PageAdvComponent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.buttons = [];
        return _this;
    }
    PageAdvComponent.prototype.onLoad = function () {
        this.pageView.enabled = false;
        // init logic
    };
    PageAdvComponent.prototype.changePage = function (event, param) {
        for (var i = 0; i < this.buttons.length; i++) {
            if (param == i) {
                this.buttons[i].interactable = false;
            }
            else {
                this.buttons[i].interactable = true;
            }
        }
        this.pageView.scrollToPage(param, 0);
    };
    PageAdvComponent.prototype.closeCurrent = function () {
        this.node.active = false;
    };
    __decorate([
        property({ type: cc.Button, default: [] })
    ], PageAdvComponent.prototype, "buttons", void 0);
    __decorate([
        property(cc.PageView)
    ], PageAdvComponent.prototype, "pageView", void 0);
    PageAdvComponent = __decorate([
        ccclass
    ], PageAdvComponent);
    return PageAdvComponent;
}(cc.Component));
exports.default = PageAdvComponent;

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=PageAdvComponent.js.map
        